<template>
	<view class="small-title">
		<view class="title-left">{{title}}</view>
		<view class="title-right" @click="more" v-if="isMore">
			<text :style="{'color': color}">查看更多</text>
			<icon class="icon_more"></icon>
		</view>
	</view>
</template>

<script>
	export default {
		name: 'LhSamllTitle',
		props:{
			title: {
				type: String,
				default: '标题'
			},
			isMore: {
				type: Boolean,
				default: false
			},
			color:{
				type: String,
				default: '#555555'
			}
		},
		data() {
			return {
			}
		},
		methods: {
			more() {
				this.$emit('more')
			}
		}
	}
</script>

<style scoped lang="scss">
	.small-title{
		display: flex;
		align-items: center;
		justify-content: space-between;
		// margin-bottom: 25rpx;
		.title-left{
			color: #555555;
			font-size: 32rpx;
			position: relative;
			padding-left: 8rpx;
			font-weight: 600;
			&::after{
				content: "";
				width: 6rpx;
				height: 22rpx;
				background: #FFC102;
				border-radius: 3rpx;
				position: absolute;
				left: -6rpx;
				top: 50%;
				transform: translateY(-50%);
			}
		}
		.title-right{
			display: flex;
			align-items: center;
			color: #999999;
			font-size: 22rpx;
			.icon_more{
				width: 10rpx;
				height: 15rpx;
				// background: url(../../static/images/ckgend.png) no-repeat;
				background-size: cover;
				margin-left: 6rpx;
			}
		}
	}
</style>
